<!DOCTYPE html>
<html lang="en" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>表单设计器</title>
    <link rel="stylesheet" href="../lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../js/lay-module/HandwrittenSignature/HandwrittenSignature.css"  media="all"/>
</head>

<body class="layui-layout-body">
    <div id="formdesigner">

    </div>
    <script src="../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../js/lay-config.js" charset="utf-8"></script>
    <script>
        var render;
        layui.use(['layer', 'HandwrittenSignature'], function () {
            var handwrittenSignature = layui.HandwrittenSignature;
            var $ = layui.jquery;
            render = handwrittenSignature.render({
                elem: '#formdesigner'
                , defaultColor: "rgba(0, 0, 0, 1)"
                , label: "用户亲笔签名"
                , signLineWidth: 3
                , isGenerateImg: true
            });
        });

        function getCanvasData() { //获取选中数据
            return render.getCanvasData();
        }

    </script>

</body>

</html>